package com.junmeng.jdemo.apng;

import android.widget.TextView;

import androidx.annotation.NonNull;

import com.example.apng.AbstractApngTextViewHelper;


import java.util.regex.Pattern;

public class MyApngTextViewHelper extends AbstractApngTextViewHelper {
    public MyApngTextViewHelper(@NonNull TextView view) {
        super(view);
    }

    @NonNull
    @Override
    public Pattern getPattern() {
        return Pattern.compile("\\[.*?\\]");
    }

    @Override
    public int getDrawableResId(@NonNull String key) {
        return EmojiData.getResId(key) == null ? -1 : EmojiData.getResId(key);
    }
}
